home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nc_mm040.geo / 00034.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  14.9 KB  |  675 lines

  1. on initLesson
  2.   setRollName(EMPTY)
  3.   set the visible of sprite 48 to 0
  4.   Set_HelpSprite(45)
  5.   Set_SoundSprite(44)
  6.   Set_NOTEPADSprite(43)
  7.   Set_GLOSSARYSprite(42)
  8.   Set_NavigatorHL(5)
  9.   Set_MainSprite(6)
  10.   Set_IndexSprite(7)
  11.   Set_FindSprite(9)
  12.   Set_TagWDSprite(8)
  13.   repeat with i = 42 to 45
  14.     set the immediate of sprite i to 1
  15.     set the puppet of sprite i to 1
  16.   end repeat
  17.   set the puppet of sprite get_NavigatorHL() to 1
  18.   set the mouseDownScript to "CheckOpenWindow"
  19. end
  20.  
  21. on GoMain
  22.   go(1, "NC_MM010.GEO")
  23. end
  24.  
  25. on CheckForTagWd
  26.   global TagWD, IndexWD, FindWD, WordWD, Find2WD
  27.   if objectp(TagWD) or objectp(IndexWD) or objectp(FindWD) or objectp(Find2WD) or objectp(WordWD) then
  28.     set the cursor of sprite 48 to [400, 401]
  29.   end if
  30. end
  31.  
  32. on PlaySound theSnd
  33.   if Get_PlayDub() then
  34.     sound playFile 2, theSnd
  35.   end if
  36. end
  37.  
  38. on Get_PlayDub
  39.   global PlayDub
  40.   return PlayDub
  41. end
  42.  
  43. on GoFind
  44.   global FindWD, CDfilePath, PCDEL
  45.   if objectp(FindWD) then
  46.     forget(FindWD)
  47.   end if
  48.   set the cursor of sprite 48 to [400, 401]
  49.   set FindWD to window (CDfilePath & "WDS" & PCDEL & "NC_FIND.GEO")
  50.   set the rect of FindWD to rect(the stageLeft + 221, the stageTop + 4, the stageLeft + 541, the stageTop + 164)
  51.   set the titleVisible of FindWD to 0
  52.   set the modal of FindWD to 1
  53.   open(FindWD)
  54. end
  55.  
  56. on HideFINDWindow
  57.   global FindWD
  58.   if objectp(FindWD) then
  59.     forget(FindWD)
  60.   end if
  61. end
  62.  
  63. on closeFindWindow
  64.   global FindWD
  65.   if objectp(FindWD) then
  66.     forget(FindWD)
  67.   end if
  68.   set the cursor of sprite 48 to 0
  69.   tell the stage
  70.     continue()
  71.   end tell
  72. end
  73.  
  74. on OpenFind2WD theData
  75.   global Find2WD, CDfilePath, PCDEL
  76.   HideFINDWindow()
  77.   set Find2WD to window (CDfilePath & "WDS" & PCDEL & "NC_FIND2.GEO")
  78.   set the rect of Find2WD to rect(the stageLeft + 48, the stageTop + 4, the stageLeft + 541, the stageTop + 212)
  79.   set the titleVisible of Find2WD to 0
  80.   set the modal of Find2WD to 1
  81.   tell Find2WD
  82.     UpdateSelection(theData)
  83.   end tell
  84.   open(Find2WD)
  85. end
  86.  
  87. on CloseFind2Window
  88.   global Find2WD
  89.   if objectp(Find2WD) then
  90.     forget(Find2WD)
  91.   end if
  92.   set the cursor of sprite 48 to 0
  93.   tell the stage
  94.     continue()
  95.   end tell
  96. end
  97.  
  98. on GoIndex
  99.   global IndexWD, CDfilePath, PCDEL
  100.   if objectp(IndexWD) then
  101.     forget(IndexWD)
  102.   end if
  103.   set the cursor of sprite 48 to [400, 401]
  104.   set IndexWD to window (CDfilePath & "WDS" & PCDEL & "NC_INDEX.GEO")
  105.   set the rect of IndexWD to rect(the stageLeft + 220, the stageTop + 4, the stageLeft + 541, the stageTop + 276)
  106.   set the titleVisible of IndexWD to 0
  107.   set the modal of IndexWD to 1
  108.   tell IndexWD
  109.     RonenInit()
  110.   end tell
  111.   open(IndexWD)
  112. end
  113.  
  114. on OpenWordWD theData
  115.   global WordWD, CDfilePath, PCDEL
  116.   HIdeIndexWindow()
  117.   set WordWD to window (CDfilePath & "WDS" & PCDEL & "NC_WORD.GEO")
  118.   set the rect of WordWD to rect(the stageLeft + 48, the stageTop + 4, the stageLeft + 541, the stageTop + 212)
  119.   set the titleVisible of WordWD to 0
  120.   set the modal of WordWD to 1
  121.   tell WordWD
  122.     UpdateSelection(theData)
  123.   end tell
  124.   open(WordWD)
  125. end
  126.  
  127. on CloseWordWindow
  128.   global WordWD
  129.   if objectp(WordWD) then
  130.     forget(WordWD)
  131.   end if
  132.   set the cursor of sprite 48 to 0
  133.   tell the stage
  134.     continue()
  135.   end tell
  136. end
  137.  
  138. on HIdeIndexWindow
  139.   global IndexWD
  140.   if objectp(IndexWD) then
  141.     forget(IndexWD)
  142.   end if
  143. end
  144.  
  145. on CloseIndexWindow
  146.   global IndexWD
  147.   if objectp(IndexWD) then
  148.     forget(IndexWD)
  149.   end if
  150.   set the cursor of sprite 48 to 0
  151.   tell the stage
  152.     continue()
  153.   end tell
  154. end
  155.  
  156. on GoIndexMovie thekind
  157.   if thekind = "tool" then
  158.     go("Init" & Get_ScreenSubject(), Get_IndexMovie())
  159.   else
  160.     go(1, Get_IndexMovie())
  161.   end if
  162. end
  163.  
  164. on set_IndexMovie theMoov
  165.   global IndexMovie
  166.   set IndexMovie to theMoov
  167. end
  168.  
  169. on Get_IndexMovie theMoov
  170.   global IndexMovie
  171.   return IndexMovie
  172. end
  173.  
  174. on GoTags
  175.   global TagWD, TAGS_DATA, TAGS_TITLES, TAGS_LIST, CDfilePath, PCDEL
  176.   if objectp(TagWD) then
  177.     forget(TagWD)
  178.   end if
  179.   set the cursor of sprite 48 to [400, 401]
  180.   set TagWD to window (CDfilePath & "WDS" & PCDEL & "NC_TAGS.GEO")
  181.   set the rect of TagWD to rect(the stageLeft + 274, the stageTop + 4, the stageLeft + 539, the stageTop + 249)
  182.   set the titleVisible of TagWD to 0
  183.   set the modal of TagWD to 1
  184.   tell TagWD
  185.     UpdateFields()
  186.     PlaceMySlider()
  187.     init()
  188.   end tell
  189.   open(TagWD)
  190. end
  191.  
  192. on OpenRenameWD theLine
  193.   global RenameWD, CDfilePath, PCDEL
  194.   set RenameWD to window (CDfilePath & "WDS" & PCDEL & "NC_RNAME.GEO")
  195.   set the rect of RenameWD to rect(the stageLeft + 286, the stageTop + 87, the stageLeft + 526, the stageTop + 199)
  196.   set the titleVisible of RenameWD to 0
  197.   set the modal of RenameWD to 1
  198.   tell RenameWD
  199.     UpdateLine(theLine)
  200.   end tell
  201.   open(RenameWD)
  202. end
  203.  
  204. on UpdateRenameWD theText
  205.   global TagWD
  206.   tell TagWD
  207.     UpdateRename(theText)
  208.   end tell
  209.   CloseRenameWD()
  210. end
  211.  
  212. on CloseRenameWD
  213.   global RenameWD
  214.   if objectp(RenameWD) then
  215.     forget(RenameWD)
  216.   end if
  217. end
  218.  
  219. on OpenSureWD
  220.   global SureWD, CDfilePath, PCDEL
  221.   set SureWD to window (CDfilePath & "WDS" & PCDEL & "NC_SURE.GEO")
  222.   set the rect of SureWD to rect(the stageLeft + 286, the stageTop + 87, the stageLeft + 526, the stageTop + 199)
  223.   set the titleVisible of SureWD to 0
  224.   set the modal of SureWD to 1
  225.   open(SureWD)
  226. end
  227.  
  228. on CloseSureWD
  229.   global SureWD
  230.   if objectp(SureWD) then
  231.     forget(SureWD)
  232.   end if
  233. end
  234.  
  235. on ClearAllTags
  236.   global CardTitles, TAGS_DATA, TAGS_TITLES, TAGS_LIST, TagWD
  237.   CloseSureWD()
  238.   set TAGS_LIST to []
  239.   set TAGS_TITLES to EMPTY
  240.   set TAGS_DATA to EMPTY
  241.   tell TagWD
  242.     UpdateFields()
  243.     PlaceMySlider()
  244.     init()
  245.   end tell
  246.   updateStage()
  247. end
  248.  
  249. on CloseTagWindow
  250.   global TagWD
  251.   if objectp(TagWD) then
  252.     forget(TagWD)
  253.   end if
  254.   set the cursor of sprite 48 to 0
  255.   tell the stage
  256.     continue()
  257.   end tell
  258. end
  259.  
  260. on GoTagMovie
  261.   go("Init" & Get_ScreenSubject(), Get_TagMovie())
  262. end
  263.  
  264. on Set_TagMovie theMovie
  265.   global TagMovie
  266.   set TagMovie to theMovie
  267. end
  268.  
  269. on Get_TagMovie
  270.   global TagMovie
  271.   return TagMovie
  272. end
  273.  
  274. on MarkScreen toMark
  275. end
  276.  
  277. on UpdateMark
  278.   global TAGS_LIST
  279.   set movieName to the movieName
  280.   if getOne(TAGS_LIST, movieName) then
  281.   end if
  282. end
  283.  
  284. on SaveSeenScreens
  285. end
  286.  
  287. on HandleSound
  288.   global volumeWindow, CDfilePath, PCDEL
  289.   if objectp(volumeWindow) then
  290.     forget(volumeWindow)
  291.   end if
  292.   EnableBtn("SOUND", get_SOUNDSprite())
  293.   set volumeWindow to window (CDfilePath & "WDS" & PCDEL & "NC_VOL.GEO")
  294.   set the rect of volumeWindow to rect(the stageLeft + 445, the stageTop + 63, the stageLeft + 574, the stageTop + 126)
  295.   set the titleVisible of volumeWindow to 0
  296.   tell volumeWindow
  297.     RestoreSoundStatus()
  298.   end tell
  299.   open(volumeWindow)
  300. end
  301.  
  302. on handleQuit
  303.   global QuitWindow, CDfilePath, PCDEL
  304.   cursor(4)
  305.   if objectp(QuitWindow) then
  306.     forget(QuitWindow)
  307.   end if
  308.   set the cursor of sprite 48 to [400, 401]
  309.   set QuitWindow to window (CDfilePath & "WDS" & PCDEL & "NC_QUIT.GEO")
  310.   set the rect of QuitWindow to rect(the stageLeft + 162, the stageTop + 122, the stageLeft + 478, the stageTop + 358)
  311.   set the titleVisible of QuitWindow to 0
  312.   set the modal of QuitWindow to 1
  313.   open(QuitWindow)
  314. end
  315.  
  316. on handleHELP
  317.   EnableBtn("HELP", get_HELPSprite())
  318.   openHelpWd()
  319. end
  320.  
  321. on openHelpWd
  322.   global helpWD, lastFrame, CDfilePath, PCDEL
  323.   set the cursor of sprite 48 to [400, 401]
  324.   set helpWD to window (CDfilePath & "WDS" & PCDEL & "NC_HLP.GEO")
  325.   set the rect of helpWD to rect(the stageLeft + 62, the stageTop + 28, the stageLeft + 586, the stageTop + 444)
  326.   set the titleVisible of helpWD to 0
  327.   set the modal of helpWD to 1
  328.   open(helpWD)
  329.   set lastFrame to the frame
  330.   go("helpLoop")
  331. end
  332.  
  333. on closeHelpWd
  334.   global helpWD, lastFrame
  335.   set the cursor of sprite 48 to 0
  336.   forget(helpWD)
  337.   go(lastFrame)
  338. end
  339.  
  340. on HandleGLOSSARY
  341.   global DicWindow
  342.   EnableBtn("GLOSSARY", Get_GLOSSARYSprite())
  343.   set the cursor of sprite 48 to [400, 401]
  344.   open(DicWindow)
  345.   tell the stage
  346.     pause()
  347.   end tell
  348.   tell DicWindow
  349.     go(2)
  350.   end tell
  351. end
  352.  
  353. on closeGLOSSARYwindow
  354.   set the cursor of sprite 48 to 0
  355.   continue()
  356. end
  357.  
  358. on closeNotePadWindow
  359.   set the cursor of sprite 48 to 0
  360.   continue()
  361. end
  362.  
  363. on HandleNOTEPAD
  364.   global NoteBookWindow, CDfilePath, PCDEL
  365.   EnableBtn("NOTEPAD", Get_NOTEPADSprite())
  366.   set the cursor of sprite 48 to [400, 401]
  367.   if objectp(NoteBookWindow) then
  368.     forget(NoteBookWindow)
  369.   end if
  370.   set NoteBookWindow to window (CDfilePath & "WDS" & PCDEL & "NC_PAD.GEO")
  371.   set the rect of NoteBookWindow to rect(the stageLeft + 7, the stageTop + 247, the stageLeft + 209, the stageTop + 419)
  372.   set NBRect to the rect of NoteBookWindow
  373.   set x1 to getAt(NBRect, 1)
  374.   set y1 to getAt(NBRect, 2)
  375.   set x2 to getAt(NBRect, 3)
  376.   set y2 to getAt(NBRect, 4)
  377.   set the modal of NoteBookWindow to 1
  378.   set the windowType of NoteBookWindow to 2
  379.   set the titleVisible of window "NoteBook" to 0
  380.   open(NoteBookWindow)
  381. end
  382.  
  383. on createNoteBook
  384.   global NBPrintWindow, CDfilePath, PCDEL
  385.   if objectp(NBPrintWindow) then
  386.     forget(NBPrintWindow)
  387.   end if
  388.   set NBPrintWindow to window (CDfilePath & "WDS" & PCDEL & "NC_PRINT.GEO")
  389.   set StageRect to the rect of the stage
  390.   set x1 to getAt(StageRect, 1)
  391.   set y1 to getAt(StageRect, 2)
  392.   set x2 to getAt(StageRect, 3)
  393.   set y2 to getAt(StageRect, 4)
  394.   set the rect of NBPrintWindow to rect(x1, y1, x1 + 640, y1 + 480)
  395.   set NBRect to the rect of NBPrintWindow
  396.   set the fileName of NBPrintWindow to "Auto Page SetUp"
  397.   set the windowType of NBPrintWindow to 2
  398.   open(NBPrintWindow)
  399. end
  400.  
  401. on closePrintWindow
  402. end
  403.  
  404. on closeQuitWindow
  405.   global QuitWindow
  406.   set the visible of sprite 48 to 0
  407.   set the cursor of sprite 48 to 0
  408.   forget(QuitWindow)
  409.   continue()
  410. end
  411.  
  412. on leaveApplication
  413.   global QuitWindow, UsersData, TheBackWindow
  414.   forget(QuitWindow)
  415.   if the machineType <> 256 then
  416.   end if
  417.   quit()
  418. end
  419.  
  420. on keyDown
  421.   if the commandDown and ((the key = "q") or (the key = ".")) then
  422.     handleQuit()
  423.   else
  424.     pass()
  425.   end if
  426. end
  427.  
  428. on CheckOpenWindow
  429.   global volumeWindow
  430.   if objectp(volumeWindow) then
  431.     forget(volumeWindow)
  432.     continue()
  433.   end if
  434. end
  435.  
  436. on CheckRollOver
  437.   if rollOver(get_IndexSprite()) then
  438.     set the castNum of sprite get_NavigatorHL() to the number of cast "Index-HL"
  439.     set Hloc to the locH of sprite get_IndexSprite()
  440.     set Vloc to the locV of sprite get_IndexSprite()
  441.   else
  442.     if rollOver(get_FindSprite()) then
  443.       set the castNum of sprite get_NavigatorHL() to the number of cast "Find-HL"
  444.       set Hloc to the locH of sprite get_FindSprite()
  445.       set Vloc to the locV of sprite get_FindSprite()
  446.     else
  447.       if rollOver(Get_TagWdSprite()) then
  448.         set the castNum of sprite get_NavigatorHL() to the number of cast "TagWD-HL"
  449.         set Hloc to the locH of sprite Get_TagWdSprite()
  450.         set Vloc to the locV of sprite Get_TagWdSprite()
  451.       else
  452.         set Hloc to EMPTY
  453.       end if
  454.     end if
  455.   end if
  456.   if Hloc <> EMPTY then
  457.     set the locH of sprite get_NavigatorHL() to Hloc
  458.     set the locV of sprite get_NavigatorHL() to Vloc
  459.     set the visible of sprite get_NavigatorHL() to 1
  460.     updateStage()
  461.   else
  462.     set the visible of sprite get_NavigatorHL() to 0
  463.     updateStage()
  464.   end if
  465. end
  466.  
  467. on setDefaultCursor
  468.   set cursorList to getCursorList()
  469.   set counter to count(cursorList)
  470.   repeat with i = 1 to counter
  471.     set currItem to getAt(cursorList, i)
  472.     if currItem <> 0 then
  473.       set CursorCastNum to getCursor(currItem)
  474.       set the cursor of sprite i to [CursorCastNum, CursorCastNum + 1]
  475.     end if
  476.   end repeat
  477. end
  478.  
  479. on setEmptyCursor
  480.   set cursorList to getCursorList()
  481.   set counter to count(cursorList)
  482.   repeat with i = 1 to counter
  483.     set currItem to getAt(cursorList, i)
  484.     if currItem <> 0 then
  485.       set the cursor of sprite i to 0
  486.       setAt(cursorList, i, 0)
  487.     end if
  488.   end repeat
  489. end
  490.  
  491. on setCursorTool int
  492.   global CursorTool
  493.   set CursorTool to int
  494. end
  495.  
  496. on initCursorCastNum
  497.   global CursorCastNum
  498.   set CursorCastNum to "400,402,404,406"
  499. end
  500.  
  501. on getCursor cursorNum
  502.   global CursorCastNum
  503.   return integer(item cursorNum of CursorCastNum)
  504. end
  505.  
  506. on initCursorList list
  507.   global cursorList
  508.   if list = 1 then
  509.     set cursorList to [2, 0, 0, 0, 0, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 3, 3, 3, 3]
  510.   else
  511.     if list = 2 then
  512.       set cursorList to [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1]
  513.     end if
  514.   end if
  515.   setDefaultCursor()
  516. end
  517.  
  518. on getCursorList
  519.   global cursorList
  520.   return cursorList
  521. end
  522.  
  523. on UpdateCursors theSp, theCursor
  524.   global cursorList
  525.   setAt(cursorList, theSp, theCursor)
  526.   if theCursor = 0 then
  527.     set the cursor of sprite theSp to theCursor
  528.   else
  529.     set CursorCastNum to getCursor(theCursor)
  530.     set the cursor of sprite theSp to [CursorCastNum, CursorCastNum + 1]
  531.   end if
  532. end
  533.  
  534. on ___BTNS_HANDLERS___
  535. end
  536.  
  537. on switchButt spriteNum, castDown, macroName
  538.   if getRollName() <> EMPTY then
  539.     set spNum to EMPTY
  540.     do("put get_" & getRollName() & "Sprite() into spNum")
  541.     set the castNum of sprite spNum to the number of cast getRollName()
  542.     setRollName(EMPTY)
  543.   end if
  544.   set flag to 0
  545.   set SaveCast to the castNum of sprite spriteNum
  546.   set flag to swapCast(spriteNum, SaveCast, castDown)
  547.   repeat while the stillDown
  548.     set flag to swapCast(spriteNum, SaveCast, castDown)
  549.   end repeat
  550.   if flag = 1 then
  551.     sound stop 1
  552.     do(macroName)
  553.   end if
  554. end
  555.  
  556. on swapCast spriteNum, SaveCast, castDown
  557.   if rollOver(spriteNum) then
  558.     set the castNum of sprite spriteNum to the number of cast castDown
  559.     updateStage()
  560.     return 1
  561.   else
  562.     set the castNum of sprite spriteNum to the number of cast SaveCast
  563.     updateStage()
  564.     return 0
  565.   end if
  566. end
  567.  
  568. on DisableBtn btnName, btnSprite
  569.   set the castNum of sprite btnSprite to the number of cast (btnName & "_F")
  570. end
  571.  
  572. on EnableBtn btnName, btnSprite
  573.   set the castNum of sprite btnSprite to the number of cast btnName
  574. end
  575.  
  576. on setRollName theName
  577.   global RollName
  578.   set RollName to theName
  579. end
  580.  
  581. on getRollName
  582.   global RollName
  583.   return RollName
  584. end
  585.  
  586. on Set_NOTEPADSprite theSp
  587.   global NOTEPADSprite
  588.   set NOTEPADSprite to theSp
  589. end
  590.  
  591. on Get_NOTEPADSprite
  592.   global NOTEPADSprite
  593.   return NOTEPADSprite
  594. end
  595.  
  596. on Set_GLOSSARYSprite theSp
  597.   global GLOSSARYSprite
  598.   set GLOSSARYSprite to theSp
  599. end
  600.  
  601. on Get_GLOSSARYSprite
  602.   global GLOSSARYSprite
  603.   return GLOSSARYSprite
  604. end
  605.  
  606. on Set_SoundSprite theSp
  607.   global SoundSprite
  608.   set SoundSprite to theSp
  609. end
  610.  
  611. on get_SOUNDSprite
  612.   global SoundSprite
  613.   return SoundSprite
  614. end
  615.  
  616. on Set_HelpSprite theSp
  617.   global HelpSprite
  618.   set HelpSprite to theSp
  619. end
  620.  
  621. on get_HELPSprite
  622.   global HelpSprite
  623.   return HelpSprite
  624. end
  625.  
  626. on Set_NavigatorHL theSp
  627.   global NavigatorHL
  628.   set NavigatorHL to theSp
  629. end
  630.  
  631. on get_NavigatorHL
  632.   global NavigatorHL
  633.   return NavigatorHL
  634. end
  635.  
  636. on Set_IndexSprite theSp
  637.   global IndexSprite
  638.   set IndexSprite to theSp
  639. end
  640.  
  641. on get_IndexSprite
  642.   global IndexSprite
  643.   return IndexSprite
  644. end
  645.  
  646. on Set_TagWDSprite theSp
  647.   global TagWdSprite
  648.   set TagWdSprite to theSp
  649. end
  650.  
  651. on Get_TagWdSprite
  652.   global TagWdSprite
  653.   return TagWdSprite
  654. end
  655.  
  656. on Set_FindSprite theSp
  657.   global FindSprite
  658.   set FindSprite to theSp
  659. end
  660.  
  661. on get_FindSprite
  662.   global FindSprite
  663.   return FindSprite
  664. end
  665.  
  666. on Set_MainSprite theSp
  667.   global MainSprite
  668.   set MainSprite to theSp
  669. end
  670.  
  671. on get_MainSprite
  672.   global MainSprite
  673.   return MainSprite
  674. end
  675.